

<neos type="view" name="head"/>
<?php
if($_SESSION['tipoUsuario'] == 1 || $_SESSION['tipoUsuario'] == 2){}
else
	echo "<body  onload=\"aparece( bt2);aparece( bt1);\">";
?>
<script type="text/javascript"> function aparece(x){if(x.style.display == 'block'){x.style.display = 'none';} else{x.style.display = 'block';};}
								function desaparece(x){x.style.display = 'none';}
								function filter(x, tabe){ for (var r = 1; r < tabe.rows.length; r++) {
										ele = tabe.rows[r].cells[1].innerHTML.replace(/<[^>]+>/g,"");
										if (ele.indexOf(x) >= 0)tabe.rows[r].style.display = 'block';
										else tabe.rows[r].style.display = 'none';}}							
</script>

<div class="pagina">
		<div class="links"><a href="<neos:url/>sair">Logoff</a> | <a href="<neos:url/>CLogin/Redirect">Menu</a></div>		<!-- Botoes de opcao -->
		
		<div id="bt">

			<input id = "bt1" class="botao" type="submit" name="bt1" value=" Confirmar Pagamento de Palestras  " style="display:none" onclick= "aparece(pag_palestra);desaparece(pag_curso)"/>
			
			<input id = "bt2" class="botao" type="submit" name="bt2" value=" Confirmar Pagamento de Minicurso  " style="display:none" onclick= "aparece(pag_curso);desaparece(pag_palestra)" />

		</div>
				
		<br /><br /><br /><br />
		<center>	
			<form action="<neos:url/>Cpagamento/conf_pagamento_palesta" id = "pag_palestra" name = "pag_palestra"  style="display:none" method = "post">
				<label>Buscar:</label>
				<input name="filtro" type="text" id="filtro" size="28" maxlength="100" onChange = "filter(this.value, tabela);" />
				<?php
					$sql = _db("SELECT * FROM pessoas p JOIN usuarios u ON ( p.id = u.pessoa_id ) JOIN participacoes pa ON ( u.id = pa.usuario_id ) WHERE pa.status_id =3");
					//var_dump($sql);
				
					echo "<TABLE BORDER=1 id = \"tabela\" name = \"tabela\">
						<TH></TH><TH>Nome</TH>";
					foreach($sql as $i){
						echo "<TR><TD><center><input type=\"checkbox\" name=\"idu=" . $i->usuario_id .  "\" id=\"valor\" value=\"1\" /> </center></TD>
						<TD><center>". $i->nome."</center></TD></TR>";
					}
					echo "</TABLE>";
				?>
				<br /><br />
				<input type="submit" value="Confirmar" value = "confirmar" />
			</form>
		</center>
		
		<center>	
			<form action="<neos:url/>Cpagamento/conf_pagamento_curso" id = "pag_curso" name = "pag_curso"  style="display:none" method = "post">
				<label>Buscar:</label>
				<input name="filtro" type="text" id="filtro" size="28" maxlength="100" onChange = "filter(this.value, tabela1);" />
				<?php
					$sql = _db("SELECT pe.nome as Unome, pa.usuario_id, pa.minicurso_id, m.nome FROM participacoesminicursos pa JOIN usuarios u ON ( u.id = pa.usuario_id ) JOIN pessoas pe ON ( pe.id = pessoa_id ) join minicursos m on (m.id = pa.minicurso_id) WHERE pa.status_id =3");
					//var_dump($sql);
				
					echo "<TABLE BORDER=1 id = \"tabela1\" name = \"tabela\">
						<TH></TH><TH>Nome</TH><TH>Minicurso</TH>";
					foreach($sql as $i){
						echo "<TR><TD><center><input type=\"checkbox\" name=\"inf=" . $i->usuario_id."=".$i->minicurso_id.  "\" id=\"valor\" value=\"1\" /> </center></TD>
						<TD><center>". $i->Unome."</center></TD><TD><center>". $i->nome."</center></TD></TR>";
					}
					echo "</TABLE>";
				?>
				<br /><br />
				<input type="submit" value="Confirmar" value = "confirmar" />
			</form>
		</center>
		
		</div>
<neos type="view" name="footer"/>
